<template>
	<view class="web-page">
		<web-view v-if="webUrl" :webview-styles="webviewStyles" :src="webUrl"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				webviewStyles: {
					progress: {
						color: '#FF3333'
					}
				},
				webUrl: ''
			}
		},
		onLoad(e) {
			if (e && e.title) {
				uni.setNavigationBarTitle({
					title: e.title
				})
			}
			if (e && e.webUrl) {
				this.webUrl = decodeURIComponent(e.webUrl)
			}
		},
		methods: {
		}
	}
</script>

<style lang="scss">
</style>
